#!/usr/bin/env bash

set -e -u -x
source ./tasks/helpers.sh

task_working_dir

# Install into the task's special _persist directory so the installed gems dir
# isn't cleaned between runs for development purposes.
mkdir -p _persist
cd _persist

# Install all the gems for use in development/test.
export PATH="$DEV_PATH"
export BUNDLE_GEMFILE="$SOURCE_DIR/Gemfile"
BUNDLE_APP_CONFIG="$(pwd -P)/.bundle"
export BUNDLE_APP_CONFIG
bundle config --local build.nokogiri --use-system-libraries
bundle config --local path "$(pwd -P)/bundle"
bundle config --local clean true
bundle install

stamp
